Release 10.1A: OpenEdge Development:
Progress 4GL Reference
IF...THEN...ELSE function
Evaluates one of two expressions, depending on the value of a specified condition.
Syntax
conditionAn expression whose value is logical (TRUE or FALSE).
expression1A constant, field name, variable name, or expression. If the
conditionis TRUE, then the function returns this value.expression2A constant, field name, variable name, or expression whose value is of a data type that is compatible with the data type of
Exampleexpression1. If theconditionis FALSE or the Unknown value (?), then the function returns this value.You can use the IF . . . THEN . . . ELSE function when you want to sort records in an unusual order. In this example, the customers are sorted so that those with a balance greater than $10,000 appear first, then those with balances between $1,000 and $10,000, and finally those with balance of $1,000 or less.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |